﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Beacon.SPC
{
    public interface ISpcRule
    {
        /// <summary>
        /// get rule id for a rule instance.
        /// </summary>
        /// <returns></returns>
        SpcRules RuleType();

        /// <summary>
        /// get rule point count
        /// </summary>
        /// <returns></returns>
        int GetRulePointCount();

        /// <summary>
        /// add data to rule
        /// if validate happens return false
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        bool AddPoint(double data);

        /// <summary>
        /// add data to rule with sample size 
        /// </summary>
        /// <param name="data"></param>
        /// <param name="sampleSize"></param>
        /// <returns></returns>
        bool AddPoint(double data, double sampleSize);

        /// <summary>
        /// reset the rule instance
        /// </summary>
        void Reset();
    }
}
